package cn.uniqueinfo.dp.service.impl;

import cn.uniqueinfo.dp.mapper.FormFieldMapper;
import cn.uniqueinfo.dp.service.IFormFieldService;
import cn.uniqueinfo.dp.service.base.BaseServiceImpl;
import cn.uniqueinfo.dp.vo.FormFieldVO;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author:朱元勋
 * @mail:395910063@qq.com
 * @date:2019-01-30 13:37:26
 * @description: 表单字段配置，主要用在表单的新增和修改
 */
@Service
public class FormFieldServiceImpl extends BaseServiceImpl<FormFieldVO> implements IFormFieldService {
    private FormFieldMapper mapper;

    public FormFieldServiceImpl(FormFieldMapper mapper) {
        this.mapper = mapper;
        this.baseMapper = mapper;
    }

    @Override
    public List<FormFieldVO> findByFormName(String formName) {
        return this.mapper.findByFormName(formName);
    }

    @Override
    public Integer syncField(String formName, String tableName) {
        return this.mapper.syncField(formName, tableName);
    }

    @Override
    public Integer deleteByFormName(String formName) {
        return this.mapper.deleteByFormName(formName);
    }
}
